package service

import (
	"context"
	"wms/pb"
	"wms/service/impl"
	"wms/service/model"
	"wms/service/request"
)

var StockSrv IStockService = &impl.StockService{}

type IStockService interface {
	//
	SkuList(ctx context.Context, arg *request.QueryStockSkuListRequest) ([]*model.SkuStock, error)
	//
	Statistics(ctx context.Context, arg *request.QueryStockStatisticsRequest) (*model.StockStatistics, error)

	BeforeAddInApply(ctx context.Context, arg *request.AddStockInApplyRequest) error
	BeforeAddOutApply(ctx context.Context, arg *request.AddStockOutApplyRequest) error

	// 申请入库
	InAddApply(ctx context.Context, arg *request.AddStockInApplyRequest) error
	// 申请出库
	OutAddApply(ctx context.Context, arg *request.AddStockOutApplyRequest) error
	// 入库 审核
	InAudit(ctx context.Context, arg *request.AuditStockInRequest) error
	// 出库 审核
	OutAudit(ctx context.Context, arg *request.AuditStockOutRequest) error
	// 入库 详情
	InDetail(ctx context.Context, arg *request.QueryStockInRequest) (*pb.StockIn, error)
	// 出库 详情
	OutDetail(ctx context.Context, arg *request.QueryStockOutRequest) (*model.StockOut, error)
	// 入库 列表
	InList(ctx context.Context, arg *request.QueryStockInRequest) ([]*model.StockIn, error)
	// 出库 列表
	OutList(ctx context.Context, arg *request.QueryStockOutRequest) ([]*model.StockOut, error)
}
